<!DOCTYPE html>
<html class="ui-mobile">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href=".">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<title>填写简历</title>
<link rel="stylesheet" href="../tool/jquery-mobile/jquery.mobile-1.4.2.min.css">
<link rel="stylesheet" href="../css/common.css">
<script src="../tool/jquery/jquery-1.11.2.min.js"></script>
<script src="../tool/jquery-mobile/jquery.mobile-1.4.2.min.js"></script>
<script src="../js/common.js"></script>
<style>
*{  text-shadow: none;
	font-family: '微软雅黑';}
 #titleButton{    	
	height:30px;
	color:#ffffff;
	background: #ee721a;
	width:17%;		
	font-size: 15px;
	position: absolute;
	top:-2px;
	left: 10px;
	border:1px solid #df7100;
}
 #signout{    	
	height:30px;
	color:#ffffff;
	background: #ee721a;
	width:17%;		
	font-size: 15px;
	position: absolute;
	top:-2px;
	right: 10px;
	border:1px solid #df7100;
}
.getmsg{
	margin-top:-18px;
	height:45px;
	background:#D4D4D4 ;
	padding:1px;
}
.qiandao{
	margin-top: 20px;
	text-align: center;
	margin-bottom: 20px;
}
#checkin{
	display: block;
	width: 80%;
	font-size: 23px;
	padding: 10px;
	margin: 0 auto;
}
.cancel{
	margin-left: 50px;
	border: none;
	background: #e97500;
	color: #ffffff;	
	border-radius: 4px;	
}
#msg{
	font-size: 30px;
}
#phone{
	display: block;
	height:40px;
	border-radius: 4px;
	border:none;
	box-shadow: none;
}
.message{
	border-bottom: 1px solid #BBBBBB;	
}
.message p{
	position:relative;
	font-size: 15px;
	margin-left: 25px;
	line-height: 10px;
}
.span_interview {
	position:absolute;
	right:70px;
}
.span_interview_number{
	position:absolute;
	right:10px;
	top:-5px;
	padding:15px;
	background-color:#ee721a;
	color:#ffffff;
	font-size: 40px;	
}
.resume{
	margin-left:10px;
	height:50px;
	/*width:95%;*/
	background: #ffffff;
	border-bottom: 1px solid #BBBBBB;	
}
.resume_t{
	/*margin-left:30px;*/
	height:50px;
	width:100%;
	background: #ffffff;
	border-bottom: 1px solid #BBBBBB;	
}

.resume .left{
	position:absolute;
	padding:15px;
	left:20px;
}
.resume img{
	position:absolute;
	width:16px;
	height:16px;
	margin-left: 2px;
	margin-top: 18px;
}
.resume:hover{
	background: #ee721a;
	color:#ffffff;
}
.right{
	position:absolute;
	padding:15px;
	right:10px;
}
#re4 img{
	position:absolute;
	width:16px;
	height:16px;
	margin-left: 12px;
	margin-top: 18px;
}

#overlay {
	display:none;
    position: fixed;
    top: 0px;
    left: 0px;
    height:100%;
    width:100%;
    background: #000000;
    opacity:0.7;
     z-index:10;
}
.delay{
	width:50%;
	height:25%;
	background:#ffffff;
	position:fixed;
	top:25%;
	left:25%;
	z-index: 1000;
	display: none;
	border-radius: 10px;
	text-align: center;
}
.delay p{
	margin-top: 50px;
}
#per{
	color:#e97500;
}
.div_header {
	height:43px; background-color:#ee721a; margin-top:-2px; text-align:center; padding:1px;
}

.p_title {
	font-size:21px; color:#FFFFFF; margin-top: 8px;
}

.div_page {
	min-height: 494px; background: rgb(238, 238, 238);
}
.span_per {
	color:#00a2df;
}

.div_progress{
	padding:1px;
	background:#ffffff;
	width:90%;
	height:150px;
	margin:0 auto;
}
.span_progress{
	display:block;
	margin:20px auto;
	width:92%;
	color:#a9a9a9;
}

.span_color{ color:#00a2df; }

.img {
	position:absolute;
	width:30px;
	height:30px;	
	top:0;
}

.img1 { left:0%; }
.img2 { left:23%;}
.img3 { left:46%;}
.img4 { left:69%; }
.img5 { left:92%;}

.span {
	position:absolute;
	top:200%;
	color:#00a2df;
}

.span1{ left:-2%; font-size:14px;}
.span2{ left:23%; font-size:14px;}
.span3{ left:44%; font-size:14px;}
.span4{ left:69%; font-size:14px;}
.span5{ left:89%; font-size:14px;}

#imgdiv{
	width:95%;
	margin:0 auto;
	position:relative;
	/*margin-top: 10%;*/
	height:15px;
	border-bottom: 1px solid #c0c0c0;
	overflow: visible;
}
</style>
</head>
<body class="ui-mobile-viewport ui-overlay-a">
<div data-role="page" id="resumestart" data-url="resumestart" tabindex="0" class="ui-page ui-page-theme-a ui-page-active div_page">	
	<div class="div_header">
		<p class="p_title" style="">填写简历</p>	
		<button id="titleButton" style="padding: 5px 0 5px 0;text-shadow: none;">返回</button>
		<button id="signout" style="padding: 5px 0 5px 0;text-shadow: none;">退出</button>
	</div>
	
	<div class="message"> 
		 <p> <span class="span_realName"></span><span class="span_interview">签到号：</span><span class="span_interview_number">99</span></p>
		 <p id="phone">139********</p>
	</div>
	<div style="background:#ffffff;width:100%">
		<div class="resume_t">
			<span style="position:absolute;padding:15px;margin-left:0px;">我的简历</span>
			<span class="right">
				完整度 <span id="per"></span>
			</span>
		</div>
		<div class="resume" id="re1"><img src="../image/signIn_02_03.png" alt=""><span class="left">个人资料</span><span class="right" id="per1"><span class="span_per">请完善</span></span></div>
		<div class="resume" id="re2"><img src="../image/signIn_02_06.png" alt=""><span class="left">求职意向</span><span class="right" id="per2"><span class="span_per">请完善</span></span></div>
		<div class="resume" id="re3"><img src="../image/signIn_02_08.png" alt=""><span class="left">工作经历</span><span class="right" id="per3"><span class="span_per">请完善</span></span></div>
		<div class="resume" id="re4"><img src="../image/signIn_02_10.png" alt="" style="margin-left:3px"><span class="left">教育经历</span><span class="right" id="per4"><span class="span_per">请完善</span></span></div>
	</div>
	<div class="qiandao"><span id="checkin" class="button green">选择面试企业</span></div>
	<div class="div_progress">
		<span class="span_progress">
			请在面试现场<span class="span_color">签到</span>，
			根据获得的<span class="span_color">面试号</span>
			依次对所填写的<span class="span_color">志愿</span>进行面试
		</span>
		<div id="imgdiv">
			<img class="img img1" src="../image/signIn_01_03.png" alt=""><span class="span span1">签到</span>
			<img class="img img2" src="../image/signIn_01_03.png" alt=""><span class="span span2">简历</span>
			<img class="img img3" src="../image/signIn_01_05.png" alt=""><span class="span span3">填志愿</span>
			<img class="img img4" src="../image/signIn_01_07.png" alt=""><span class="span span4">面试</span>
			<img class="img img5" src="../image/signIn_01_07.png" alt=""><span class="span span5">到岗</span>					
		</div>
	</div>
	<input type="hidden" id="userId">
	<div class="delay"><p>保存中,请稍等...</p></div>
	<div id="overlay"></div>
</div>

<script type="text/javascript">
 
$(document).ready(function() {
	
	 $.ajax({
		 url: common.ctx + '/sign/getCurSignUser',
		 type: 'GET',
		 async: false,
		 data: {},
		 dataType: 'json',
		 success: function(jsonData) {
			 if (jsonData.success == true) {
				 if (jsonData.data && jsonData.data[0]) {
					 $("#userId").val(jsonData.data[0].id);
					 $(".span_realName").text(jsonData.data[0].userName == null ? "" :jsonData.data[0].userName);
					 $("#phone").text(jsonData.data[0].phoneNumber);
					 loadcurSign();
					 loadResume();
				 } else {
					 window.location.href= common.ctx + "/html/sign.html";
				 }
			 } else {
				 alert(jsonData.msg);
			 }

		 },
		 error: common.ajaxError
		 
	 });
	 
	 function loadcurSign() {
		$.ajax({
			 url: common.ctx + '/sign/curSign',
			 type: 'GET',
			 async: false,
			 data: {},
			 dataType: 'json',
				 success: function(jsonData) {
					 if (jsonData.success == true) {
						 if (jsonData.data && jsonData.data[0]) {
							 $(".span_interview_number").text(jsonData.data[0].userNumber);
						 } else {
							 window.location.href= common.ctx + "/html/sign.html";
						 }
					 } else {
						 alert(jsonData.msg);
					 }

				 },
				 error: common.ajaxError
			});
		};
	 
	 function loadResume() {
		 $.ajax({
			 url: common.ctx + '/sign/resume/getbyUserId',
			 type: 'GET',
			 async: false,
			 data: {userId : $("#userId").val()},
			 dataType: 'json',
			 success: function(jsonData) {
				 if (jsonData.success == true) {
					 if (typeof(jsonData.data[0])!='undefined') {
						 
						$("#per").html(jsonData.data[0].completion + "%");	
						 
						if (jsonData.data[0].isBascInfoFull == 1) {
							$("#per1").html("完成");	
						} else {
							$("#per1").html("请完善").addClass("span_per");	
						}
						
						if (jsonData.data[0].isIntentionFull == 1) {
							$("#per2").html("完成");	
						} else {
							$("#per2").html("请完善").addClass("span_per");	
						}
						
						if (jsonData.data[0].isExperienceFull == 1) {
							$("#per3").html("完成");	
						} else {
							$("#per3").html("请完善").addClass("span_per");	
						}
						
						if (jsonData.data[0].isEducationFull == 1) {
							$("#per4").html("完成");	
						} else {
							$("#per4").html("请完善").addClass("span_per");	
						}
					 }
				 } else {
					 alert(jsonData.msg);
				 }

			 },
			 error: function(XMLHttpRequest, textStatus, errorThrown) {
				 if (common.debug == "on") {
					 alert(XMLHttpRequest.status);
		         	 alert(XMLHttpRequest.readyState);
		        	 alert(textStatus);
				 }
			 }
			 
		 });
		 
	 };
	 
	 $("#re1").click(function(){
		 window.location.href=common.ctx + "/html/resume01.html";
	 });
	
	 $("#re2").click(function(){
		 window.location.href=common.ctx + "/html/resume02.html";
	 });
	 
	 $("#re3").click(function(){
		 window.location.href=common.ctx + "/html/resume03.html";
	 }); 
	 
	 $("#re4").click(function(){
		 window.location.href=common.ctx + "/html/resume04.html";
	 });
	 
	 $("#checkin").click(function(){
		if($("#per1").text()!="完成"
				||$("#per2").text()!="完成"
				||($("#per3").text()!="完成" && $("#per4").text()!="完成")){
			alert("请完善您的简历!");			
		} else {
			window.location.href=common.ctx + "/html/volunteer.html";
		}
	 });
	 
	 $("#titleButton").click(function(){  window.location.href= common.ctx + "/html/sign.html"; });

	 $("#signout").click(function() {
		 $.ajax({
			 url: common.ctx + '/sign/signout',
			 type: 'GET',
			 async: false,
			 data: {},
			 dataType: 'json',
			 success: function(jsonData) {
				 if (jsonData.success == true) {
					 window.location.href= common.ctx + "/html/sign.html";
				 }
			 },
			 error:common.ajaxError
		 });
	 });
});
 
</script>
<div class="ui-loader ui-corner-all ui-body-a ui-loader-default"><span class="ui-icon-loading"></span><h1>loading</h1></div></body></html>